package com.mytest.leetcode;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Solution278 {

    public static void main(String[] args) {
        Solution278 solution704 = new Solution278();
        log.info("{}", solution704.firstBadVersion(4));
    }


    public int firstBadVersion(int n) {
        int left = 1;
        int right = n;
//        while(left < right) {
//            int mid = (right-left)/2 + left;
//            if(isBadVersion(mid)){
//                right = mid;
//            }else{
//                left = mid +1;
//            }
//        }
        return right;
    }
}
